﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Frogism.Core {
  public class Category : ObjectNameBase{
      public virtual decimal Month { get; set; }
      public virtual decimal Budget { get; set; }
      public virtual decimal Remaining { get { return Month - Budget; } }
      public virtual decimal LastMonth { get; set; }
      public virtual decimal LastMonthDiff
      {
      get {
        return Month - LastMonth;
      }
    }
      public virtual decimal Year { get; set; }
      public virtual decimal MonthAvg
      {
      get {
        if(DateTime.Now.Month == 0) {
          return Year;
        } else {
          return (Year - Month) / (decimal)(DateTime.Now.Month - 1);
        }
      }
    }
      public virtual decimal MonthAvgDiff { get { return Month - MonthAvg; } }
  }
}
